package com.xiaolong.redis.annotation;

import com.xiaolong.redis.enums.LockBlockEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Lock {

    String key();

    int executeTime() default 30;

    int waitTime() default 30;

    String msg() default "The same task is already being executed";

    LockBlockEnum block() default LockBlockEnum.QUEUE;
}
